package pagemaker;

import java.io.File;
import java.io.IOException;

import javax.swing.ImageIcon;

/**
 * This interface specifies a class that can extract pages from a pdf document
 * at a given dot per inch resolution. The class must offer an operation that
 * returns the number of pages of the document.
 *
 * @author Thibault Langlois
 *
 */
public interface IPDFPageMaker {

    /**
     * @return the number of pages of the document.
     */
    public int getNumberOfPages();

    /**
     * @param pageNumber
     * @param dpi : The resolution of the image in dot per inch.
     * @requires pageNumber > 0 && pageNumber <= getNumberOfPages() && dpi > 1
     * @return an instance of ImageIcon that represent the document page.
     * @throws ExternalProgramException when the external program causes an
     * error.
     * @throws IOException when the pdfFile could not be read.
     */
    public ImageIcon getPage(int pageNumber, int dpi) throws IOException, ExternalProgramException;
}
